package com.guyu.plugin.password.exception;

import com.guyu.common.core.exception.BizException;
import com.guyu.common.core.exception.code.ErrorCodeEnum;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serial;


/**
 * <p> 密码异常 </p>
 */
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class PasswordException extends BizException {

    @Serial
    private static final long serialVersionUID = 1L;

    public PasswordException(String message) {
        super(ErrorCodeEnum.SYSTEM_ERROR.getCode(), message, "pwd");
    }

    public PasswordException(String message, Throwable e) {
        super(ErrorCodeEnum.SYSTEM_ERROR.getCode(), message, "pwd", e);
    }

    public PasswordException(Throwable e) {
        this(e.getMessage(), e);
    }


}
